<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>房屋详情页</title>
    <link rel="stylesheet" href="../../layui/css/layui.css">
    <!-- 样式 -->
    <link rel="stylesheet" href="../../css/style.css"/>
    <!-- 主题（主要颜色设置） -->
    <link rel="stylesheet" href="../../css/theme.css"/>
    <!-- 通用的css -->
    <link rel="stylesheet" href="../../css/common.css"/>
    <link rel="stylesheet" href="../../xznstatic/css/bootstrap.min.css">
</head>
<style>
    .particulars {
        width: 90%;
        background-color: #fff;
        border-bottom: 1px dotted var(--publicMainColor);
        padding: 10px 0;
    }

    .dataExhibition {
        display: inline-block;
        width: 60%;
    }

    .displayBianhao {
        display: inline-block;
        width: auto;
    }

    .detail-tab .layui-tab-card>.layui-tab-title .layui-this{
        border: 2px dotted var(--publicMainColor);
        background-color: #fff;
        color: #000;
    }</style>
<body>

    <div id="app">
<div style="width: 1000px;margin: 10px auto;height: auto;">
    <div style="border: 1px  dotted var(--publicMainColor);border-radius: 15px;margin-top:25px;height: 50px;line-height: 50px;padding-left: 15px;display: flex;justify-content: space-between;align-items: center;padding-right: 15px;">
        <span>
            <a style="color: #000;" href="../home/home.html">
                首页
            </a>/
            <a>
                <cite style="color: #815476;">
                    {{title}}
                </cite>
            </a>
        </span>
        <a v-if='storeupFlag' @click="addFangwuCollection()" href="javascript:void(0)" style="text-decoration: none;display: block;width: 40px;height: 40px; border-radius: 50%;text-align: center;line-height: 40px;background-color: #fff;">
            <i class="layui-icon" style="font-size: 40px;color: red;" v-if='true'>&#xe67a;</i>
        </a>
        <a style="text-decoration: none;display: block;width: 40px;height: 40px; border-radius: 50%;text-align: center;line-height: 40px;background-color: #fff;"
           v-if='!storeupFlag' @click="addFangwuCollection()" href="javascript:void(0)">
            <i class="layui-icon" style="font-size: 40px;color: red;" v-if='true'>&#xe67b;</i>
        </a>
    </div>
    <div style="display: flex;margin-top: 20px;">
        <!-- 详情介绍 -->
        <div style="width: 50%;height: auto;">
            <div class="particulars" style="text-align: center;font-size: 18px;">
                <span>{{title}}</span>
            </div>
                  <div v-if="detail.fangwuUuidNumber" class="particulars">
                      <span class="displayBianhao">房屋编号:</span>
                      <span class="dataExhibition"> {{detail.fangwuUuidNumber}} </span>
                  </div>
                  <div v-if="detail.fangwuAddress" class="particulars">
                      <span class="displayBianhao">房屋位置:</span>
                      <span class="dataExhibition"> {{detail.fangwuAddress}} </span>
                  </div>
                  <div v-if="detail.fangwuLouceng" class="particulars">
                      <span class="displayBianhao">楼层:</span>
                      <span class="dataExhibition"> {{detail.fangwuLouceng}} </span>
                  </div>
                  <div v-if="detail.fangwuDanyuan" class="particulars">
                      <span class="displayBianhao">单元:</span>
                      <span class="dataExhibition"> {{detail.fangwuDanyuan}} </span>
                  </div>
                  <div v-if="detail.fangwuFanghao" class="particulars">
                      <span class="displayBianhao">房号:</span>
                      <span class="dataExhibition"> {{detail.fangwuFanghao}} </span>
                  </div>
                  <div v-if="detail.fangwuTypes" class="particulars">
                      <span class="displayBianhao">房屋类型:</span>
                      <span class="dataExhibition"> {{detail.fangwuValue}} </span>
                  </div>
                  <div v-if="detail.fangwuLoupanTypes" class="particulars">
                      <span class="displayBianhao">楼盘:</span>
                      <span class="dataExhibition"> {{detail.fangwuLoupanValue}} </span>
                  </div>
                  <div v-if="detail.huxing" class="particulars">
                      <span class="displayBianhao">户型:</span>
                      <span class="dataExhibition"> {{detail.huxing}} </span>
                  </div>
                  <div v-if="detail.fangwuJiegou" class="particulars">
                      <span class="displayBianhao">房屋结构:</span>
                      <span class="dataExhibition"> {{detail.fangwuJiegou}} </span>
                  </div>
                  <div v-if="detail.fangwuJianzhujiegou" class="particulars">
                      <span class="displayBianhao">建筑结构:</span>
                      <span class="dataExhibition"> {{detail.fangwuJianzhujiegou}} </span>
                  </div>
                  <div v-if="detail.fangwuZhuangxiu" class="particulars">
                      <span class="displayBianhao">装修情况:</span>
                      <span class="dataExhibition"> {{detail.fangwuZhuangxiu}} </span>
                  </div>
                  <div v-if="detail.fangwuYongtu" class="particulars">
                      <span class="displayBianhao">房屋用途:</span>
                      <span class="dataExhibition"> {{detail.fangwuYongtu}} </span>
                  </div>
                  <div v-if="detail.fangwuFangbenTypes" class="particulars">
                      <span class="displayBianhao">房本:</span>
                      <span class="dataExhibition"> {{detail.fangwuFangbenValue}} </span>
                  </div>
                  <div v-if="detail.fangwuClicknum" class="particulars">
                      <span class="displayBianhao">房屋热度:</span>
                      <span class="dataExhibition"> {{detail.fangwuClicknum}} </span>
                  </div>
                  <div v-if="detail.fangwuMianji" class="particulars">
                      <span class="displayBianhao">房屋面积:</span>
                      <span class="dataExhibition"> {{detail.fangwuMianji}} </span>
                  </div>
                  <div v-if="detail.fangwuJiage" class="particulars">
                      <span class="displayBianhao">总价(万):</span>
                      <span class="dataExhibition"> {{detail.fangwuJiage}} </span>
                  </div>
                  <div v-if="detail.fangwuzhuangtaiTypes" class="particulars">
                      <span class="displayBianhao">房屋状态:</span>
                      <span class="dataExhibition"> {{detail.fangwuzhuangtaiValue}} </span>
                  </div>
        </div>
        <!-- 图片 -->
        <div style="width: 50%;height: auto;">
            <div>
                <div v-if="swiperList.length" v-for="(item,index) in swiperList" :key="index">
                    <img style="width: 100%;height: 100%;object-fit:cover;" :src="baseUrl+item" />
                </div>
            </div>
        </div>
    </div>
    <!-- 按钮 -->
    <div style="width: 100%;">
        <div  style="display: flex;margin-top: 30px;justify-content: center;border-bottom:1px dotted var(--publicMainColor) ;border-top:1px dotted var(--publicMainColor) ;padding: 20px;align-items: center;">
            <button v-if="detail.fangwuzhuangtaiTypes==1" @click="fangwuYuyueModal=true"  style="height:auto;" :style='{"padding":"0 10px","boxShadow":"0 0 0px rgba(255,0,0,.3)","margin":"0 5px","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(23, 124, 176, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"6px","borderWidth":"0","width":"auto","lineHeight":"40px","fontSize":"16px","borderStyle":"solid"}' type="button" class="layui-btn btn-submit">
                立即预约看房
            </button>
            <!--
             <button @click="fangwuYuyue()" style="height:auto;" :style='{"padding":"0 10px","boxShadow":"0 0 0px rgba(255,0,0,.3)","margin":"0 5px","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(23, 124, 176, 1)","color":"rgba(255, 255, 255, 1)","borderRadius":"6px","borderWidth":"0","width":"auto","lineHeight":"40px","fontSize":"16px","borderStyle":"solid"}' type="button" class="layui-btn btn-submit">
                 立即预约
             </button>
        -->
        </div>
    </div>

    <!-- 视频 -->


    <!-- 评论 -->
    <div class="layui-row detail-tab" style="border: none;box-shadow: none;">
        <div class="layui-tab layui-tab-card" style="overflow: hidden;border: none; box-shadow: none;">
            <ul class="layui-tab-title " :style='{"backgroundColor":"#fff","fontSize":"14px"}' style="color: var(--publicMainColor);border: none;">
                <li class="layui-this">房屋介绍</li>
                <li >小区介绍</li>
                <li >周边配套</li>
                <li>留言</li>
            </ul>

            <div class="layui-tab-content" style="border: 1px dotted var(--publicMainColor);border-radius: 15px;margin-top: 10px;margin-bottom: 50px;">
                <div class="layui-tab-item layui-show">
                    <div v-html="myFilters(detail.fangwuContent)"></div>
                </div>
                <div class="layui-tab-item">
                    <div v-html="myFilters(detail.fangwuXiaoquContent)"></div>
                </div>
                <div class="layui-tab-item">
                    <div v-html="myFilters(detail.fangwuPeitaoContent)"></div>
                </div>
                <div class="layui-tab-item">
                    <div class="message-container">
                        <form class="layui-form message-form"
                              :style='{"padding":"20px","boxShadow":"0 0 0px rgba(255,0,0,.3)","margin":"0 0 20px 0","borderColor":"rgba(135, 206, 250, 1)","backgroundColor":"#fff","borderRadius":"10px","borderWidth":"0","borderStyle":"solid"}'>
                            <div class="layui-form-item layui-form-text"
                                 style="display: flex;align-items: center;margin:0">
                                <label style="width: auto;"
                                       :style='{"padding":"0","minWidth":"54px","fontSize":"14px","color":"#333","textAlign":"left"}'
                                       class="layui-form-label">
                                    留言
                                </label>
                                <div class="layui-input-block" style="margin:0;flex:1;">
                                    <textarea class="main_borderColor layui-textarea":style='{"padding":"10px","backgroundColor":"#fff","color":"rgba(135, 206, 250, 1)","borderRadius":"10px","borderWidth":"1px","fontSize":"14px","borderStyle":"dotted","height":"120px"}'
                                      id="fangwuLiuyanText"placeholder="留言内容" required lay-verify="required"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button lay-submit lay-filter="fangwuLiuyanText" class="layui-btn btn-submit main_backgroundColor" :style='{"padding":"0 10px","boxShadow":"0 0 0px rgba(255,0,0,.3)","margin":"10px 5px 0","borderColor":"rgba(0,0,0,.3)","color":"rgba(95, 89, 89, 1)","borderRadius":"4px","borderWidth":"0","width":"auto","lineHeight":"34px","fontSize":"14px","borderStyle":"dotted"}'>
                                        立即提交
                                    </button>
                                    <!--<button class="layui-btn layui-btn-primary sub_backgroundColor"
                                            :style='{"padding":"0 10px","boxShadow":"0 0 0px rgba(255,0,0,.3)","margin":"10px 5px 0","borderColor":"rgba(0,0,0,.3)","color":"rgba(255, 255, 255, 1)","borderRadius":"4px","borderWidth":"0","width":"auto","lineHeight":"34px","fontSize":"14px","borderStyle":"dotted"}'
                                            type="reset">
                                        重置
                                    </button>-->
                                </div>
                            </div>
                        </form>
                        <div class="message-list"
                             :style='{"padding":"0 20px 20px","boxShadow":"0 0 0px rgba(255,0,0,.3)","margin":"0","borderColor":"var(--publicSubColor)}","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"0","borderStyle":"dotted"}'>
                            <div v-for="(item,index) in fangwuLiuyanDataList" v-bind:key="index"
                                 :style='{"padding":"20px 0","boxShadow":"0 0 0px rgba(255,0,0,0)","margin":"0","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","borderRadius":"0","borderWidth":"0 0 1px 0","borderStyle":"dotted"}'
                                 class="message-item">
                                <div class="username-container" style="display: flex;justify-content: space-between;">
                                    <div style="display:flex;">
                                        <img :src="baseUrl+item.yonghuPhoto"
                                             :style='{"boxShadow":"0 0 0px rgba(255,0,0,.3)","margin":"0 10px 0 0","borderColor":"rgba(0,0,0,.3)","borderRadius":"50%","borderWidth":"0","width":"40px","borderStyle":"dotted","height":"40px"}'
                                             class="avator">
                                        <span style="display: inline-block;"
                                              :style='{"padding":"0 10px","boxShadow":"0 0 0px rgba(255,0,0,.3)","margin":"0","borderColor":"rgba(0,0,0,.3)","backgroundColor":"#fff","color":"rgba(6, 82, 121, 1)","borderRadius":"4px","borderWidth":"0","width":"auto","lineHeight":"28px","fontSize":"14px","borderStyle":"dotted"}'
                                              class="username">
                                            {{item.yonghuName}}
                                        </span>
                                        <el-rate v-if="item.fangwuCommentbackPingfenNumber" v-model="item.fangwuCommentbackPingfenNumber" disabled show-score text-color="#ff9900"
                                                 score-template="{value}">
                                        </el-rate>
                                    </div>
                                    <span style="font-size: 12px">{{item.insertTime}}</span>
                                </div>
                                <div class="content" style="margin: 0;flex: 1;">
												<span class="message main_color" style="display: inline-block;"
                                                      :style='{"padding":"8px","boxShadow":"0 0 0px rgba(255,0,0,.3)","margin":"8px 0 0 50px","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(255, 0, 0, 0)","borderRadius":"4px","borderWidth":"0","fontSize":"14px","borderStyle":"dotted"}'>
													留言:{{item.fangwuLiuyanText}}
												</span>
                                </div>
                                <div v-if="item.replyText" class="content" style="margin: 0;flex: 1;">
												<span class="message sub_color" style="display: inline-block;"
                                                      :style='{"padding":"8px","boxShadow":"0 0 0px rgba(255,0,0,.3)","margin":"8px 0 0 50px","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(255, 0, 0, 0)","borderRadius":"4px","borderWidth":"0","fontSize":"14px","borderStyle":"dotted"}'>
													回复:{{item.replyText}}
												</span>
                                </div>
                            </div>
                        </div>
                        <div class="pager" id="LiuyanPager"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 预约和报名模态框 -->
<el-dialog title="预约看房" :visible.sync="fangwuYuyueModal" :modal-append-to-body="false">
    <el-form>
        <el-form-item label="预约看房时间">
            <el-date-picker
                    v-model="fangwuYuyueTime"
                    type="datetime"
                    placeholder="选择时间">
            </el-date-picker>
        </el-form-item>
      <el-form-item label="预约缘由">
          <el-input type="textarea" v-model="fangwuYuyueText"></el-input>
      </el-form-item>

    </el-form>
    <div slot="footer" class="dialog-footer">
        <el-button @click="fangwuYuyueModal = false">关 闭</el-button>
        <el-button type="primary" @click="submitFangwuYuyue()">提 交</el-button>
    </div>
</el-dialog>    </div>


    <script src="../../layui/layui.js"></script>
    <script src="../../js/vue.js"></script>
    <!-- 引入element组件库 -->
    <script src="../../xznstatic/js/element.min.js"></script>
    <!-- 引入element样式 -->
    <link rel="stylesheet" href="../../xznstatic/css/element.min.css">
    <!-- 组件配置信息 -->
    <script src="../../js/config.js"></script>
    <!-- 扩展插件配置信息 -->
    <script src="../../modules/config.js"></script>
    <!-- 工具方法 -->
    <script src="../../js/utils.js"></script>

    <script>
        Vue.prototype.myFilters= function (msg) {
            if(msg != null){
                return msg.replace(/\n/g, "<br>");
            }else{
                return "";
            }
        };
        var vue = new Vue({
            el: '#app',
            data: {
                //当前登录用户信息
                user:{},
                // 轮播图
                swiperList: [],//用于当前表的图片
                // 数据详情
                detail: {
                    id: 0
                },
                // 商品标题
                title: '',
                totalScore: 0,//评分
                baseUrl:"",//路径
                storeupFlag: 0,//收藏 [0为收藏 1已收藏]
                //系统推荐
                fangwuRecommendList: [],
                    // 当前详情页表
                detailTable: 'fangwu',
                // 留言列表
                fangwuLiuyanDataList: [],
                //预约看房
                fangwuYuyueModal:false,
                fangwuYuyueText:"",
                fangwuYuyueTime:new Date(),
            },
            methods: {
                //分享
                share(){
                    let element = createElement("http://localhost:8080/shoulouguanli/front/index.html?url="+"./pages/fangwu/detail.html?id="+this.id);
                    element.select();
                    element.setSelectionRange(0, element.value.length);
                    document.execCommand('copy');
                    element.remove();
                    layui.layer.msg('复制分享页面成功,快去分享吧!', {time: 2000,icon: 6});
                },

                jump(url) {
                    jump(url)
                },
                isAuth(tablename, button) {
                    return isFrontAuth(tablename, button)
                },
                //预约
                fangwuYuyue(){
                    let _this = this;
                    // localStorage.setItem('fangwuId', _this.detail.id);
                    // _this.jump("../fangwuOrder/add.html");

                    let data={
                        fangwuId:_this.detail.id,
                        yonghuId:localStorage.getItem("userid"),
                        fangwuOrderYesnoTypes:1,
                    }
                    // 提交数据
                    layui.http.requestJson('fangwuOrder/add', 'post', data, function (res) {
                        if(res.code == 0) {
                            layui.layer.msg('预约成功', {
                                time: 2000,
                                icon: 6
                            }, function () {
                                _this.jump("../fangwuOrder/list.html");
                            });
                        }else{
                            layui.layer.msg(res.msg, {
                                time: 5000,
                                icon: 5
                            });
                        }
                    });
                },
                //提交预约看房
                submitFangwuYuyue(){
                    let _this = this;

                    let data={
                        fangwuId:_this.detail.id, // 当前表id
                        yonghuId:localStorage.getItem("userid"),// 预约看房人
                        fangwuYuyueYesnoTypes:1,
                        fangwuYuyueText:_this.fangwuYuyueText,
                        fangwuYuyueTime:getDatetimeFormat(_this.fangwuYuyueTime),
                        fangwuYuyueUuidNumber:new Date().getTime(),
                    }
                    // 提交数据
                    layui.http.requestJson('fangwuYuyue/add', 'post', data, function (res) {
                        if(res.code == 0) {
                            layui.layer.msg('已申请预约看房,请等待回复', {
                                time: 2000,
                                icon: 6
                            }, function () {
                                _this.jump("../fangwuYuyue/list.html");
                            });
                        }else{
                            layui.layer.msg("已经预约过了,无法重复预约", {
                                time: 5000,
                                icon: 5
                            });
                        }
                    });
                },                // 收藏商品
                addFangwuCollection() {
                    let _this = this;
                    layui.http.request('fangwuCollection/list', 'get', {
                        page: 1,
                        limit: 1,
                        fangwuId: _this.detail.id,
                        fangwuCollectionTypes: 1,
                        yonghuId: localStorage.getItem('userid'),
                    }, (res) => {
                        if (res.data.list.length == 1) {
                            layui.http.requestJson('fangwuCollection/delete', 'post', [res.data.list[0].id], function (res) {
                                layui.layer.msg('取消成功', {
                                    time: 1000,
                                    icon: 5
                                }, function () {
                                    window.location.reload();
                                });
                            });
                            return false;
                        }
                        layui.http.requestJson('fangwuCollection/add', 'post', {
                            yonghuId: localStorage.getItem('userid'),
                            fangwuId: _this.detail.id,
                            fangwuCollectionTypes: 1,
                        }, function (res) {
                            layui.layer.msg('收藏成功', {
                                time: 1000,
                                icon: 6
                            }, function () {
                                window.location.reload();
                            });
                        });
                    });
                },

                }
        });

        layui.use(['layer', 'form', 'element', 'carousel', 'http', 'jquery', 'laypage', 'util'], function () {
            var layer = layui.layer;
            var util = layui.util;
            var element = layui.element;
            var form = layui.form;
            var carousel = layui.carousel;
            var http = layui.http;
            var jquery = layui.jquery;
            var laypage = layui.laypage;
            vue.baseUrl = http.baseurl

            localStorage.setItem("goUtl","./pages/fangwu/detail.html?id="+ http.getParam('id'))

            var limit = 10;

            let table = localStorage.getItem("userTable");
            if(table){
                http.request(table+"/session", 'get', {}, function (data) {
                    vue.user = data.data;
                });
            }

            // 数据ID
            var id = http.getParam('id');
            vue.detail.id = id;
            // 数据信息
            http.request(`${vue.detailTable}/detail/` + id, 'get', {}, function (res) {
                // 详情信息
                vue.detail = res.data;
                vue.title = vue.detail.fangwuName;
                vue.detail.fangwuContent = vue.detail.fangwuContent.replaceAll("src=\"upload/","src=\""+vue.baseUrl+"upload/");
                vue.detail.fangwuXiaoquContent = vue.detail.fangwuXiaoquContent.replaceAll("src=\"upload/","src=\""+vue.baseUrl+"upload/");
                vue.detail.fangwuPeitaoContent = vue.detail.fangwuPeitaoContent.replaceAll("src=\"upload/","src=\""+vue.baseUrl+"upload/");
                // 轮播图片
                vue.swiperList = vue.detail.fangwuPhoto ? vue.detail.fangwuPhoto.split(",") : [];
                // 轮播图
                vue.$nextTick(() => {
                    carousel.render({
                        elem: '#swiper',
                        width: '420px',
                        height: '400px',
                        arrow: 'hover',
                        anim: 'default',
                        autoplay: 'true',
                        interval: '3000',
                        indicator: 'inside'
                    });
                });

            });


            // 系统推荐
            http.request(`fangwu/gexingtuijian`, 'get', {
                page: 1,
                limit: 5,
                fangwuTypes: vue.detail.fangwuTypes,
                fangwuDelete: 1,
                shangxiaTypes: 1,//上架的
                fangwuLoupanTypes: vue.detail.fangwuLoupanTypes,
                fangwuFangbenTypes: vue.detail.fangwuFangbenTypes,
                fangwuzhuangtaiTypes: vue.detail.fangwuzhuangtaiTypes,
            }, function (res) {
                vue.fangwuRecommendList = res.data.list;
            });

            if (localStorage.getItem('userid')) {
                http.request('fangwuCollection/list', 'get', {
                    page: 1,
                    limit: 1,
                    fangwuId: vue.detail.id,
                    yonghuId: localStorage.getItem('userid'),
                }, function (res) {
                    if(res.data.total >0){
                        res.data.list.forEach(element => {
                            if (element.fangwuCollectionTypes == 1) {
                                vue.storeupFlag = 1;
                            }
                            if (element.fangwuCollectionTypes == 2) {
                                vue.zanFlag = 1;
                            }
                            if (element.fangwuCollectionTypes == 3) {
                                vue.caiFlag = 1;
                            }
                        });

                    }
                });
            }

            // 获取留言
            http.request(`${vue.detailTable}Liuyan/list`, 'get', {
                page: 1,
                limit: limit,
                fangwuId: vue.detail.id
            }, function (res) {
                vue.fangwuLiuyanDataList = res.data.list;
                // 分页
                laypage.render({
                    elem: 'fangwuLiuyanPager',
                    count: res.data.total,
                    limit: limit,
                    jump: function (obj, first) {
                        //首次不执行
                        if (!first) {
                            http.request(`${vue.detailTable}Liuyan/list`, 'get', {
                                page: obj.curr,
                                limit: obj.limit,
                                fangwuId: vue.detail.id
                            }, function (res) {
                                vue.fangwuLiuyanDataList = res.data.list
                            })
                        }
                    }
                });
            });

            // 提交留言
            form.on('submit(fangwuLiuyanText)', function (data) {
                data.yonghuId = localStorage.getItem('userid');
                data.tableName = localStorage.getItem('userTable');
                data.fangwuLiuyanText =jquery("#fangwuLiuyanText").val();
                if(data.fangwuLiuyanText == null || data.fangwuLiuyanText == ''){
                    layer.msg("留言不能为空", {
                        time: 2000,
                        icon: 2
                    });
                    return false;
                }
                data.fangwuId = vue.detail.id;
                http.requestJson(`${vue.detailTable}Liuyan/add`, 'post', data, function (res) {
                    layer.msg('留言成功', {
                        time: 2000,
                        icon: 6
                    }, function () {
                        window.location.reload();
                    });
                    return false;
                });
                return false;
            });
        });
    </script>
</body>
</html>
